package rdp.cmd.base;

import org.bukkit.Location;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.PlayerDeathEvent;
import rdp.RDPUtil;


public class LSNBase implements Listener {
    private FileConfiguration conf;

    public LSNBase() {
    }

    public LSNBase(FileConfiguration conf) {
        this.conf = conf;
    }

    @EventHandler
    public void onDeath(PlayerDeathEvent e) {
        e.setKeepLevel(true);
        Player player = e.getEntity();
        Location location = player.getLocation();
        RDPUtil.SEND(player, "§e玩家: §f" + player.getName() + "\n" + "§e死亡世界: §f" + location.getWorld().getName() + "\n" + "§e死亡坐标: §f" + (int) location.getX() + " , " + (int) location.getY() + " , " + (int) location.getZ());
    }

}
